package com.zhen;

import com.zhen.domain.Person;
import com.zhen.factory.FKSqlSessionFactory;
import com.zhen.mapper.PersonMapper;
import org.apache.ibatis.session.SqlSession;

public class OneToOneTest {

    public static void main(String[] args) {
        SqlSession session = FKSqlSessionFactory.getSqlSession();
        PersonMapper personMapper = session.getMapper(PersonMapper.class);
        Person person = personMapper.selectPersonById(1);
        System.out.println(person);
        System.out.println(person.getCard());
        session.commit();
        session.close();
    }

}
